home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 5981 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: soap.news.pipex.net!pipex!usenet
  2. From: m.hendry@dial.pipex.com (Mathew Hendry)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Want to boot FAAAST?
  5. Date: Fri, 22 Mar 96 22:40:29
  6. Organization: Private node.
  7. Distribution: world
  8. Message-ID: <19960322.3F8A50.1446D@ai051.du.pipex.com>
  9. References: <68771929@0humpty.tomate.tng.oche.de> <1280.6645T903T2008@mailbox.swipnet.se> <4ipc7i$6n@sun1000.pwr.wroc.pl> <4irl0n$1dng@columba.udac.uu.se>
  10. NNTP-Posting-Host: ai051.du.pipex.com
  11. X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
  12.  
  13. Erik Trulsson (t92etr@sabik.tdb.uu.se) wrote:
  14. : Robert Wojcik (wojcikr@alpha.ok.ae.wroc.pl) wrote:
  15. : : This is strange wondering, regarding one block of Ram Disk takes 1024 bytes.
  16. : : Anyway another 1024 for file header ...and it sucks like hell.
  17. : That is a very common (and natural) misconception.
  18. : The 1024 bytes block size reported bt RAM: is a lie from the filesystem.
  19. : The ram disk doesn't use fixed blocks to hold the files, it only uses the
  20. : amount of memory that is actually needed (plus some small overhead most likely)
  21. [...]
  22.  
  23. The overhead is about 130 bytes or so per file (a bit more, I suppose, if the
  24. entire file cannot be contained within a single memory chunk).
  25.  
  26. Try this script:
  27. --- CUT ---
  28. .key dummy
  29. .bra {
  30. .ket }
  31.  
  32. set counter 1
  33. set endtotal `avail total`
  34. set starttotal `avail total`
  35.  
  36. echo "Testing..."
  37. lab copyloop
  38.   echo >ram:test{$$}_$counter "t" noline
  39.   set counter `eval $counter + 1`
  40. if val $counter not gt 100
  41.   skip back copyloop
  42. endif
  43.  
  44. set endtotal `avail total`
  45. delete quiet ram:test{$$}_#?
  46. echo "RAM used to store 100 1 byte files = `eval $starttotal - $endtotal`"
  47. --- CUT ---
  48.  
  49. which will write 100 1 byte files to RAM: and report on the amount of RAM
  50. used. On my machine this produces:
  51. Testing...
  52. RAM used to store 100 1 byte files = 13600
  53.  
  54. or 136 bytes per file, amounting to an overhead of 135 bytes per file.
  55.  
  56. -- Mat.
  57.